package com.example.chapter03.util;

import android.app.Activity;
import android.content.Context;
import android.inputmethodservice.InputMethodService;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

/**
 * Author:LiuZejiang
 * Date:2022/10/13  16:54
 * JDK-Version:1.8
 */
public class ViewUtil {

    public static void hideOneInputMethod(Activity act, View v) {
        InputMethodManager imm = (InputMethodManager) act.getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(v.getWindowToken(),0);
    }
}
